﻿<UserControl x:Class="LEDManager.LEDManagement"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:db="clr-namespace:LEDDataBase;assembly=LEDDataBase"
             xmlns:my="clr-namespace:LEDManager"
        Height="1200" 
             Width="800" 
             Name="home"
        >
    <UserControl.Resources>
        <db:LEDDataSet  x:Key="lEDDataSet" />
        <CollectionViewSource  x:Key="vwMASTER" Source="{Binding Path=MASTER,Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwLEDSYSTEM" Source="{Binding Path=LEDSYSTEM, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwLEDLIST" Source="{Binding Path=LEDLIST, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwCTEXT" Source="{Binding Path=CTEXT, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwCPICTURE" Source="{Binding Path=CPICTURE, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwCMOVIE" Source="{Binding Path=CMOVIE, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwCCOUNT" Source="{Binding Path=CCOUNT, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwPROGRAM" Source="{Binding Path=PROGRAM, Source={StaticResource lEDDataSet} }" />
        <CollectionViewSource x:Key="vwLEAF" Source="{Binding Path=LEAF, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwLEAFDETAIL" Source="{Binding Path=LEAFDETAIL, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwFONTTABLE" Source="{Binding Path=FONTTABLE, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwFORMATDEF" Source="{Binding Path=FORMATDEF, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwEFFECTDEF" Source="{Binding Path=EFFECTDEF, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwSPEEDDEF" Source="{Binding Path=SPEEDDEF, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwLOCATION" Source="{Binding Path=LOCATION, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwLAYOUT" Source="{Binding Path=LAYOUT, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwLAYOUTMASTER" Source="{Binding Path=LAYOUTMASTER, Source={StaticResource lEDDataSet}}" />
        <CollectionViewSource x:Key="vwCONTENTTYPE" Source="{Binding Path=CONTENTTYPE, Source={StaticResource lEDDataSet}}" />
    </UserControl.Resources>
    <Grid>
        <TabControl>
            <TabItem Header="系统管理">
                <WrapPanel>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition></RowDefinition>
                            <RowDefinition Height="100"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <StackPanel Grid.Row="0" Grid.Column="0" >
                            <WrapPanel>
                                <Button Content="装载" Name="cmdLoadSystem" Click="cmdLoadSystem_Click"></Button>
                                <Button Content="保存" Name="cmdSaveSystem" Click="cmdSaveSystem_Click"></Button>
                                <Button Content="编辑" Name="cmdEditLED" Click="cmdEditLED_Click"></Button>
                            </WrapPanel>
                            <StackPanel >
                                <Grid HorizontalAlignment="Left" Margin="0,0,0,0" Name="grid1" VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="系统:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lLSYSTEMTextBox" 
                         Text="{Binding Path=LLSYSTEM, Source={StaticResource ResourceKey=vwLEDLIST}, Mode=TwoWay, 
                        ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                </Grid>
                                <Grid HorizontalAlignment="Left" Margin="0,0,0,0" Name="grid2" VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="46*" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="前缀:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lLLEDPRETextBox" 
                     Text="{Binding Path=LLLEDPRE,Source={StaticResource ResourceKey=vwLEDLIST},Mode=TwoWay, 
                        ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                </Grid>
                                <Grid HorizontalAlignment="Left" Margin="0,0,0,0" Name="grid3" VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="编号:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lLLEDNUMBERTextBox" 
                     Text="{Binding Path=LLLEDNUMBER,Source={StaticResource ResourceKey=vwLEDLIST},Mode=TwoWay,
                        ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                                <DataGrid 
                AutoGenerateColumns="False" 
                EnableRowVirtualization="True"
                ItemsSource="{Binding Source={StaticResource ResourceKey=vwLEDLIST}}"
                HeadersVisibility="Column"
                x:Name="dlgLEDLIST" 
                RowDetailsVisibilityMode="VisibleWhenSelected" 
                Width="100" 
                Height="Auto" 
                EnableColumnVirtualization="True"
                ScrollViewer.HorizontalScrollBarVisibility="Auto"
                ScrollViewer.VerticalScrollBarVisibility="Auto" 
                MinHeight="80" MaxHeight="400" SelectionChanged="dlgLEDLIST_SelectionChanged">
                                    <DataGrid.Columns>
                                        <DataGridTextColumn x:Name="lLLEDPREColumn"
                                        Header="前缀"
                                        Binding="{Binding Path=LLLEDPRE}"  
                                        Width="SizeToCells" />
                                        <DataGridTextColumn x:Name="lLLEDNUMBERColumn" 
                                        Header="编号"
                                        Binding="{Binding Path=LLLEDNUMBER}" 
                                         Width="SizeToCells" />
                                    </DataGrid.Columns>
                                </DataGrid>
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                    <Grid Grid.Row="0" Grid.Column="1" MaxHeight="{Binding Path=Width, ElementName=home}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="1*"></ColumnDefinition>
                            <ColumnDefinition Width="1*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <WrapPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                            <Button Content="保存" Height="23" Name="cmdSaveMaster" Click="cmdSaveMaster_Click" Width="75" />
                        </WrapPanel>
                        <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
                            <WrapPanel>
                                <Grid  HorizontalAlignment="Left" Margin="0,0,0,0" Name="grid4" VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="系统:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMSYSTEMTextBox" 
                         Text="{Binding Path=LMSYSTEM, Source={StaticResource ResourceKey=vwMASTER}, 
                    Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                </Grid>
                                <Grid  HorizontalAlignment="Left" Name="grid10" VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="屏ID:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMIDTextBox" 
                         Text="{Binding Path=LMLEDID, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, 
                        ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                </Grid>
                                <Grid  HorizontalAlignment="Left"   VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="前缀:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMLEDPRETextBox"
                         Text="{Binding Path=LMLEDPRE, Source={StaticResource ResourceKey=vwMASTER},  
                    Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                </Grid>
                                <Grid HorizontalAlignment="Left"   VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="编号:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMLEDNUMBERTextBox" 
                         Text="{Binding Path=LMLEDNUMBER, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, 
                    ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                                <Grid  HorizontalAlignment="Left"   VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="位置:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMLOCATIONTextBox" 
                         Text="{Binding Path=LMLOCATION, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                                <Grid  HorizontalAlignment="Left"   VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="最大节目ID:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMMAXPROGIDTextBox" 
                         Text="{Binding Path=LMMAXPROGID, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                            </WrapPanel>
                            <WrapPanel>
                                <Grid  HorizontalAlignment="Left" Name="grid14" VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="连接方式:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMCONNECTMETHODTextBox" 
                         Text="{Binding Path=LMCONNECTMETHOD, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                                <Grid  HorizontalAlignment="Left" Name="grid5" VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="IP地址:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMTCPIP4ADDRESSTextBox" 
                             Text="{Binding Path=LMTCPIP4ADDRESS, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="120" />
                                </Grid>
                                <Grid  HorizontalAlignment="Left" Name="grid6" VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="端口:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMTCPIP4PORTTextBox" 
                             Text="{Binding Path=LMTCPIP4PORT, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, 
                        ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                </Grid>
                                <Grid HorizontalAlignment="Left" Name="grid8" VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="本地端口:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMREMOTEPORTTextBox" 
                             Text="{Binding Path=LMLOCALPORT, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, 
                        ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                </Grid>
                            </WrapPanel>
                            <WrapPanel>
                                <Grid   HorizontalAlignment="Left" Name="grid11" VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="屏高mm:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMPHYSICALHEIGHTTextBox" 
                         Text="{Binding Path=LMPHYSICALHEIGHT, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, 
                        ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="50" />
                                </Grid>
                                <Grid  Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,0" Name="grid7" VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="屏宽mm:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" 
                                 Name="lMPHYSICALWIDTHTextBox" Text="{Binding Path=LMPHYSICALWIDTH,
                            Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" 
                                 VerticalAlignment="Center" Width="50" />
                                </Grid>
                                <Grid  HorizontalAlignment="Left" Name="grid12" VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="水平点数:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMLEDXPOINTTextBox"
                         Text="{Binding Path=LMLEDXPOINT, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                                <Grid  HorizontalAlignment="Left" Name="grid13" VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="垂直点数:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMLEDYPOINTTextBox" 
                         Text="{Binding Path=LMLEDYPOINT, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, 
                        ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                            </WrapPanel>
                        </StackPanel>
                        <StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
                            <WrapPanel>
                                <TextBlock>节目</TextBlock>
                                <Button Content="装载" Name="cmdLoadProg" Click="cmdLoadProg_Click"></Button>
                                <Button Content="新建" Name="cmdNewProg" Click="cmdNewProg_Click"></Button>
                                <Button Content="保存" Name="cmdSaveProg" Click="cmdSaveProg_Click"></Button>
                                <WrapPanel>
                                    <Grid  HorizontalAlignment="Left" Name="gdcmbPRPROGRAMID" VerticalAlignment="Top">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <Label Content="选择节目ID:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                        <ComboBox DisplayMemberPath="PRPROGRAMID" Grid.Column="1" Grid.Row="0" Height="23" 
                                                  IsEditable="True"
                                                  IsTextSearchEnabled="True"
                                                      HorizontalAlignment="Left" ItemsSource="{Binding Source={StaticResource ResourceKey=vwPROGRAM}}"
                                                      Margin="3" Name="pRPROGRAMIDComboBox" VerticalAlignment="Center" Width="60">
                                            <ComboBox.ItemsPanel>
                                                <ItemsPanelTemplate>
                                                    <VirtualizingStackPanel />
                                                </ItemsPanelTemplate>
                                            </ComboBox.ItemsPanel>
                                        </ComboBox>
                                    </Grid>
                                    <Grid HorizontalAlignment="Left" Name="gdPRPROGRAMID" VerticalAlignment="Top">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <Label Content="节目ID:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                        <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" 
                                             Name="pRPROGRAMIDTextBox" Text="{Binding Path=PRPROGRAMID, 
                                        Source={StaticResource ResourceKey=vwPROGRAM}, Mode=TwoWay, ValidatesOnExceptions=true, 
                                        NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                    </Grid>
                                    <Grid HorizontalAlignment="Left" Name="gdPRPROGRAMNAME" VerticalAlignment="Top">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <Label Content="节目名称:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                        <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3"
                                             Name="pRPROGRAMNAMETextBox" Text="{Binding Path=PRPROGRAMNAME, Source={StaticResource ResourceKey=vwPROGRAM}, 
                                        Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="60" />
                                    </Grid>
                                    <Grid HorizontalAlignment="Left" Name="gdPRPROGDES" VerticalAlignment="Top">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <Label Content="说明:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                        <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="pRPROGDESTextBox" 
                                             Text="{Binding Path=PRPROGDES, Source={StaticResource ResourceKey=vwPROGRAM}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="240" />
                                    </Grid>
                                </WrapPanel>
                            </WrapPanel>
                            <WrapPanel>
                                <WrapPanel>
                                    <StackPanel>
                                        <WrapPanel>
                                            <TextBlock>帧编辑</TextBlock>
                                            <Button Content="装载" Name="cmdLoadLeaf" Click="cmdLoadLeaf_Click"></Button>
                                            <Button Content="新建" Name="cmdNewLeaf" Click="cmdNewLeaf_Click"></Button>
                                            <Button Content="保存" Name="cmdSaveLeaf" Click="cmdSaveLeaf_Click"></Button>
                                            <Grid HorizontalAlignment="Left" Name="gdLEFLEDID" VerticalAlignment="Top">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="Auto" />
                                                </Grid.ColumnDefinitions>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                </Grid.RowDefinitions>
                                                <Label Content="选择帧ID:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                <ComboBox DisplayMemberPath="LFLEAFID" Grid.Column="1" Grid.Row="0" Height="23" 
                                                          HorizontalAlignment="Left" ItemsSource="{Binding Source={StaticResource ResourceKey=vwLEAF}}"
                                                          Margin="3" Name="lFLEAFIDComboBox" VerticalAlignment="Center" Width="60"
                                                          IsEditable="True"
                                                          SelectionChanged="lFLEAFIDComboBox_SelectionChanged"
                                                          IsTextSearchEnabled="True"
                                                          >
                                                    <ComboBox.ItemsPanel>
                                                        <ItemsPanelTemplate>
                                                            <VirtualizingStackPanel />
                                                        </ItemsPanelTemplate>
                                                    </ComboBox.ItemsPanel>
                                                </ComboBox>
                                            </Grid>
                                            <Grid HorizontalAlignment="Left" Name="gdLFLEAFID" VerticalAlignment="Top">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="Auto" />
                                                </Grid.ColumnDefinitions>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                </Grid.RowDefinitions>
                                                <Label Content="帧ID:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lFLEAFIDTextBox" 
                                                 Text="{Binding Path=LFLEAFID, Source={StaticResource ResourceKey=vwLEAF}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="30" />
                                            </Grid>
                                            <Grid HorizontalAlignment="Left" Name="gdLFDURATION" VerticalAlignment="Top">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="Auto" />
                                                </Grid.ColumnDefinitions>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                </Grid.RowDefinitions>
                                                <Label Content="持续时间:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lFDURATIONTextBox" 
                                                 Text="{Binding Path=LFDURATION, Source={StaticResource ResourceKey=vwLEAF}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                            </Grid>
                                            <Grid HorizontalAlignment="Left" Name="gdLFLEAFDES" VerticalAlignment="Top">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="Auto" />
                                                </Grid.ColumnDefinitions>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                </Grid.RowDefinitions>
                                                <Label Content="描述:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lFLEAFDESTextBox" 
                                                         Text="{Binding Path=LFLEAFDES, Source={StaticResource ResourceKey=vwLEAF}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="140" />
                                            </Grid>
                                        </WrapPanel>
                                        <WrapPanel>
                                            <Grid HorizontalAlignment="Left" Name="grid55" VerticalAlignment="Top">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="Auto" />
                                                </Grid.ColumnDefinitions>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                </Grid.RowDefinitions>
                                                <Label Content="模板:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                <ComboBox DisplayMemberPath="LYLAYOUTDES" Grid.Column="1" Grid.Row="0" 
                                                          Height="23" HorizontalAlignment="Left" ItemsSource="{Binding Source={StaticResource ResourceKey=vwLAYOUT}}" 
                                                          IsEditable="True"
                                                          IsTextSearchEnabled="True"
                                                          Margin="3" Name="lYLAYOUTDESComboBox" VerticalAlignment="Center" Width="160">
                                                    <ComboBox.ItemsPanel>
                                                        <ItemsPanelTemplate>
                                                            <VirtualizingStackPanel />
                                                        </ItemsPanelTemplate>
                                                    </ComboBox.ItemsPanel>
                                                </ComboBox>
                                            </Grid>
                                            <Button Content="创建区域" Name="cmdLeafArea" Click="cmdLeafArea_Click"></Button>
                                        </WrapPanel>
                                        <StackPanel>
                                            <Grid>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="300"></RowDefinition>
                                                    <RowDefinition Height="Auto"></RowDefinition>
                                                </Grid.RowDefinitions>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="300"></ColumnDefinition>
                                                    <ColumnDefinition Width="1*"></ColumnDefinition>
                                                </Grid.ColumnDefinitions>
                                                <StackPanel Grid.Row="0" Grid.Column="1">
                                                    <WrapPanel>
                                                        <Grid  HorizontalAlignment="Left" Name="grid24" VerticalAlignment="Top">
                                                            <Grid.ColumnDefinitions>
                                                                <ColumnDefinition Width="Auto" />
                                                                <ColumnDefinition Width="Auto" />
                                                                <ColumnDefinition Width="Auto" />
                                                            </Grid.ColumnDefinitions>
                                                            <Grid.RowDefinitions>
                                                                <RowDefinition Height="Auto" />
                                                                <RowDefinition Height="Auto" />
                                                                <RowDefinition Height="Auto" />
                                                                <RowDefinition Height="Auto" />
                                                            </Grid.RowDefinitions>
                                                            <Label Content="左上(x,y):" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" />
                                                            <WrapPanel Grid.Column="0" Grid.Row="1" >
                                                                <TextBox  Height="23" HorizontalAlignment="Left" Margin="3" Name="lDLTOPXTextBox" Text="{Binding Path=LDLTOPX, Source={StaticResource ResourceKey=vwLEAFDETAIL}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                                                <TextBox  Height="23" HorizontalAlignment="Left" Margin="3" Name="lDLTOPYTextBox" Text="{Binding Path=LDLTOPY, Source={StaticResource ResourceKey=vwLEAFDETAIL}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                                            </WrapPanel>
                                                            <Label Content="右上(x,y):" Grid.Column="2" Grid.Row="0" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" />
                                                            <WrapPanel Grid.Column="2" Grid.Row="1">
                                                                <TextBox  Height="23" HorizontalAlignment="Left" Margin="3" Name="lDRTOPXTextBox" 
                                                                         Text="{Binding Path=LDRTOPX, Source={StaticResource ResourceKey=vwLEAFDETAIL}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                                                <TextBox Height="23" HorizontalAlignment="Left" Margin="3" Name="lDRTOPYTextBox" 
                                                                         Text="{Binding Path=LDRTOPY, Source={StaticResource ResourceKey=vwLEAFDETAIL}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                                            </WrapPanel>
                                                            <Label Content="左下(x,y):" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" />
                                                            <WrapPanel Grid.Column="0" Grid.Row="2" >
                                                                <TextBox  Height="23" HorizontalAlignment="Left" Margin="3" Name="lDLBOTTOMXTextBox" 
                                                                          Text="{Binding Path=LDLBOTTOMX, Source={StaticResource ResourceKey=vwLEAFDETAIL},Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                                                <TextBox  Height="23" HorizontalAlignment="Left" Margin="3"
                                                                          Name="lDLBOTTOMYTextBox" 
                                                                          Text="{Binding Path=LDLBOTTOMY, Source={StaticResource ResourceKey=vwLEAFDETAIL},Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                                            </WrapPanel>
                                                            <Label Content="右下(x,y):" Grid.Column="2" Grid.Row="3" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" />
                                                            <WrapPanel Grid.Column="2" Grid.Row="2" >
                                                                <TextBox  Height="23" HorizontalAlignment="Left" Margin="3" Name="lDRBOTTOMXTextBox" 
                                                                         Text="{Binding Path=LDRBOTTOMX, Source={StaticResource ResourceKey=vwLEAFDETAIL}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                                                <TextBox Height="23" HorizontalAlignment="Left" Margin="3" Name="lDRBOTTOMYTextBox" 
                                                                         Text="{Binding Path=LDRBOTTOMY, Source={StaticResource ResourceKey=vwLEAFDETAIL}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                                            </WrapPanel>
                                                        </Grid>
                                                        <WrapPanel>
                                                            <Grid HorizontalAlignment="Left" Name="grid22" VerticalAlignment="Top">
                                                                <Grid.ColumnDefinitions>
                                                                    <ColumnDefinition Width="Auto" />
                                                                    <ColumnDefinition Width="Auto" />
                                                                </Grid.ColumnDefinitions>
                                                                <Grid.RowDefinitions>
                                                                    <RowDefinition Height="Auto" />
                                                                </Grid.RowDefinitions>
                                                                <Label Content="区域ID:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                                <ComboBox DisplayMemberPath="LDAREAID" Grid.Column="1" Grid.Row="0" Height="23" 
                                                          HorizontalAlignment="Left" ItemsSource="{Binding Source={StaticResource ResourceKey=vwLEAFDETAIL}}"
                                                          Margin="3" Name="lDAREAIDComboBox" VerticalAlignment="Center" Width="60"
                                                          IsEditable="True"
                                                          SelectionChanged="lDAREAIDComboBox_SelectionChanged"
                                                          IsTextSearchEnabled="True"
                                                          >
                                                                    <ComboBox.ItemsPanel>
                                                                        <ItemsPanelTemplate>
                                                                            <VirtualizingStackPanel />
                                                                        </ItemsPanelTemplate>
                                                                    </ComboBox.ItemsPanel>
                                                                </ComboBox>
                                                            </Grid>
                                                            <Grid HorizontalAlignment="Left" Name="grid23" VerticalAlignment="Top">
                                                                <Grid.ColumnDefinitions>
                                                                    <ColumnDefinition Width="Auto" />
                                                                    <ColumnDefinition Width="Auto" />
                                                                </Grid.ColumnDefinitions>
                                                                <Grid.RowDefinitions>
                                                                    <RowDefinition Height="Auto" />
                                                                </Grid.RowDefinitions>
                                                                <Label Content="类型:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                                <ComboBox 
                                                                    Text="{Binding Path=LDCONTENTTYPE, Source={StaticResource ResourceKey=vwLEAFDETAIL}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                                                    DisplayMemberPath="CTCONTENTTYPE" 
                                                                    SelectedValuePath="CTCONTENTTYPE"
                                                                    Grid.Column="1" Grid.Row="0" 
                                                                    Height="23" 
                                                                    HorizontalAlignment="Left" 
                                                                    ItemsSource="{Binding Source={StaticResource ResourceKey=vwCONTENTTYPE}}"
                                                                    Margin="3" Name="lDCONTENTTYPEComboBox" 
                                                                    VerticalAlignment="Center" Width="120"
                                                                    IsEditable="True"
                                                                    SelectionChanged="lDCONTENTTYPEComboBox_SelectionChanged"
                                                                    IsTextSearchEnabled="True"
                                                                    >
                                                                    <ComboBox.ItemsPanel>
                                                                        <ItemsPanelTemplate>
                                                                            <VirtualizingStackPanel />
                                                                        </ItemsPanelTemplate>
                                                                    </ComboBox.ItemsPanel>
                                                                </ComboBox>
                                                            </Grid>
                                                        </WrapPanel>
                                                    </WrapPanel>
                                                    <TabControl Name="TabContent">
                                                        <TabItem Name="tabText" Header="文本">
                                                            <StackPanel>
                                                                <Grid HorizontalAlignment="Left" Name="grid34" VerticalAlignment="Top">
                                                                    <Grid.ColumnDefinitions>
                                                                        <ColumnDefinition Width="Auto" />
                                                                        <ColumnDefinition Width="Auto" />
                                                                    </Grid.ColumnDefinitions>
                                                                    <Grid.RowDefinitions>
                                                                        <RowDefinition Height="Auto" />
                                                                    </Grid.RowDefinitions>
                                                                    <Label Content="文字:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="cTCONTENTTextBox" 
                                                                             Text="{Binding Path=CTCONTENT,Source={StaticResource ResourceKey=vwCTEXT},  Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="240" />
                                                                </Grid>
                                                                <Grid HorizontalAlignment="Left" Name="grid35" VerticalAlignment="Top">
                                                                    <Grid.ColumnDefinitions>
                                                                        <ColumnDefinition Width="Auto" />
                                                                        <ColumnDefinition Width="Auto" />
                                                                    </Grid.ColumnDefinitions>
                                                                    <Grid.RowDefinitions>
                                                                        <RowDefinition Height="Auto" />
                                                                    </Grid.RowDefinitions>
                                                                    <Label Content="文件:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="cTEXTFILETextBox" 
                                                                             Text="{Binding Path=CTEXTFILE,Source={StaticResource ResourceKey=vwCTEXT},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="240" />
                                                                </Grid>
                                                                <WrapPanel>
                                                                    <Grid HorizontalAlignment="Left" Name="grid36" VerticalAlignment="Top">
                                                                        <Grid.ColumnDefinitions>
                                                                            <ColumnDefinition Width="Auto" />
                                                                            <ColumnDefinition Width="Auto" />
                                                                        </Grid.ColumnDefinitions>
                                                                        <Grid.RowDefinitions>
                                                                            <RowDefinition Height="Auto" />
                                                                        </Grid.RowDefinitions>
                                                                        <Label Content="字体:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                                        <TextBox 
                                                                            Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="cTFONTIDTextBox" 
                                                                                 Text="{Binding Path=CTFONTID, Source={StaticResource ResourceKey=vwCTEXT}, Mode=TwoWay,
                                                                            ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="60" />
                                                                    </Grid>
                                                                    <Grid  HorizontalAlignment="Left" Name="grid37" VerticalAlignment="Top">
                                                                        <Grid.ColumnDefinitions>
                                                                            <ColumnDefinition Width="Auto" />
                                                                            <ColumnDefinition Width="Auto" />
                                                                        </Grid.ColumnDefinitions>
                                                                        <Grid.RowDefinitions>
                                                                            <RowDefinition Height="Auto" />
                                                                        </Grid.RowDefinitions>
                                                                        <Label Content="效果:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                                        <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="cTEFFECTTextBox" 
                                                                                 Text="{Binding Path=CTEFFECT,Source={StaticResource ResourceKey=vwCTEXT},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="20" />
                                                                    </Grid>
                                                                    <Grid HorizontalAlignment="Left" Name="grid38" VerticalAlignment="Top">
                                                                        <Grid.ColumnDefinitions>
                                                                            <ColumnDefinition Width="Auto" />
                                                                            <ColumnDefinition Width="Auto" />
                                                                        </Grid.ColumnDefinitions>
                                                                        <Grid.RowDefinitions>
                                                                            <RowDefinition Height="Auto" />
                                                                        </Grid.RowDefinitions>
                                                                        <Label Content="速度:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                                        <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="cTSPEEDTextBox" 
                                                                                 Text="{Binding Path=CTSPEED,Source={StaticResource ResourceKey=vwCTEXT},  
                                                                            Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="20" />
                                                                    </Grid>
                                                                    <Grid HorizontalAlignment="Left" Name="grid39" VerticalAlignment="Top">
                                                                        <Grid.ColumnDefinitions>
                                                                            <ColumnDefinition Width="Auto" />
                                                                            <ColumnDefinition Width="Auto" />
                                                                        </Grid.ColumnDefinitions>
                                                                        <Grid.RowDefinitions>
                                                                            <RowDefinition Height="Auto" />
                                                                        </Grid.RowDefinitions>
                                                                        <Label Content="透明度:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                                        <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" 
                                                                                 Name="cTTRANSPARENTTextBox" Text="{Binding Path=CTTRANSPARENT,Source={StaticResource ResourceKey=vwCTEXT},  
                                                                            Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="120" />
                                                                    </Grid>
                                                                </WrapPanel>
                                                            </StackPanel>
                                                        </TabItem>
                                                        <TabItem Name="tabPicture" Header="图片">
                                                            <StackPanel>
                                                                <Grid HorizontalAlignment="Left" Name="grid47" VerticalAlignment="Top">
                                                                    <Grid.ColumnDefinitions>
                                                                        <ColumnDefinition Width="Auto" />
                                                                        <ColumnDefinition Width="Auto" />
                                                                    </Grid.ColumnDefinitions>
                                                                    <Grid.RowDefinitions>
                                                                        <RowDefinition Height="Auto" />
                                                                    </Grid.RowDefinitions>
                                                                    <Label Content="文件:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3"
                                                                             Name="cPPICTUREFILETextBox" Text="{Binding Path=CPPICTUREFILE, Source={StaticResource ResourceKey=vwCPICTURE}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="240" />
                                                                </Grid>
                                                                <Grid HorizontalAlignment="Left" Name="grid48" VerticalAlignment="Top">
                                                                    <Grid.ColumnDefinitions>
                                                                        <ColumnDefinition Width="Auto" />
                                                                        <ColumnDefinition Width="Auto" />
                                                                    </Grid.ColumnDefinitions>
                                                                    <Grid.RowDefinitions>
                                                                        <RowDefinition Height="Auto" />
                                                                    </Grid.RowDefinitions>
                                                                    <Label Content="宽X高:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Center" />
                                                                    <WrapPanel Grid.Column="1" Grid.Row="0">
                                                                        <TextBox Height="23" HorizontalAlignment="Left" Margin="0" Name="cPWIDTHTextBox"
                                                                                 Text="{Binding Path=CPWIDTH,Source={StaticResource ResourceKey=vwCPICTURE}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                                                        <TextBlock Height="23" VerticalAlignment="Center">X</TextBlock>
                                                                        <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="0" Name="cPHEIGHTTextBox"
                                                                             Text="{Binding Path=CPHEIGHT,Source={StaticResource ResourceKey=vwCPICTURE}, Mode=TwoWay, 
                                                                        ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                                                    </WrapPanel>
                                                                </Grid>
                                                                <WrapPanel>
                                                                    <Grid HorizontalAlignment="Left" Name="grid50" VerticalAlignment="Top">
                                                                        <Grid.ColumnDefinitions>
                                                                            <ColumnDefinition Width="Auto" />
                                                                            <ColumnDefinition Width="Auto" />
                                                                        </Grid.ColumnDefinitions>
                                                                        <Grid.RowDefinitions>
                                                                            <RowDefinition Height="Auto" />
                                                                        </Grid.RowDefinitions>
                                                                        <Label Content="效果:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                                        <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="cPEFFECTTextBox" Text="{Binding Path=CPEFFECT, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                                                    </Grid>
                                                                    <Grid HorizontalAlignment="Left" Name="grid51" VerticalAlignment="Top">
                                                                        <Grid.ColumnDefinitions>
                                                                            <ColumnDefinition Width="Auto" />
                                                                            <ColumnDefinition Width="Auto" />
                                                                        </Grid.ColumnDefinitions>
                                                                        <Grid.RowDefinitions>
                                                                            <RowDefinition Height="Auto" />
                                                                        </Grid.RowDefinitions>
                                                                        <Label Content="速度:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                                        <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="cPSPEEDTextBox" 
                                                                             Text="{Binding Path=CPSPEED,Source={StaticResource ResourceKey=vwCPICTURE}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                                                    </Grid>
                                                                    <Grid HorizontalAlignment="Left" Name="grid52" VerticalAlignment="Top">
                                                                        <Grid.ColumnDefinitions>
                                                                            <ColumnDefinition Width="Auto" />
                                                                            <ColumnDefinition Width="Auto" />
                                                                        </Grid.ColumnDefinitions>
                                                                        <Grid.RowDefinitions>
                                                                            <RowDefinition Height="Auto" />
                                                                        </Grid.RowDefinitions>
                                                                        <Label Content="透明度:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                                                        <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" 
                                                                             Name="cPTRANSPARENTTextBox" Text="{Binding Path=CPTRANSPARENT,Source={StaticResource ResourceKey=vwCPICTURE},Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                                                                    </Grid>
                                                                </WrapPanel>
                                                            </StackPanel>
                                                        </TabItem>
                                                        <TabItem Name="tabMovie" Header="影片"></TabItem>
                                                        <TabItem Name="tabCount" Header="计数"></TabItem>
                                                        <TabItem Name="tabTime" Header="时间"></TabItem>
                                                    </TabControl>
                                                </StackPanel>
                                                <WrapPanel></WrapPanel>
                                                <WrapPanel></WrapPanel>
                                                <DataGrid Grid.Row="1" 
                                                      Grid.Column="0" 
                                                      Grid.ColumnSpan="2" 
                                                      AutoGenerateColumns="False" 
                                                      EnableRowVirtualization="True" 
                                                      Height="Auto"
                                                      ItemsSource="{Binding Source={StaticResource vwLEAFDETAIL}}" 
                                                      Name="lEAFDETAILDataGrid"
                                                      RowDetailsVisibilityMode="VisibleWhenSelected" 
                                                      Width="Auto">
                                                    <DataGrid.Columns>
                                                        <DataGridTextColumn x:Name="lDAREAIDColumn" Binding="{Binding Path=LDAREAID}" Header="内容ID" Width="SizeToCells" MinWidth="30" />
                                                        <DataGridTextColumn x:Name="lDCONTENTTYPEColumn" Binding="{Binding Path=LDCONTENTTYPE}" Header="类型" Width="SizeToCells" MinWidth="50" />
                                                        <DataGridTextColumn x:Name="lDLTOPXColumn" Binding="{Binding Path=LDLTOPX}" Header="LTOPX" Width="SizeToCells" MinWidth="50"/>
                                                        <DataGridTextColumn x:Name="lDLTOPYColumn" Binding="{Binding Path=LDLTOPY}" Header="LTOPY" Width="SizeToCells" MinWidth="50" />
                                                        <DataGridTextColumn x:Name="lDLBOTTOMXColumn" Binding="{Binding Path=LDLBOTTOMX}" Header="LBX" Width="SizeToCells"  MinWidth="50"/>
                                                        <DataGridTextColumn x:Name="lDLBOTTOMYColumn" Binding="{Binding Path=LDLBOTTOMY}" Header="LBY" Width="SizeToCells" MinWidth="50"/>
                                                        <DataGridTextColumn x:Name="lDRTOPXColumn" Binding="{Binding Path=LDRTOPX}" Header="RTOPX" Width="SizeToCells" MinWidth="50"/>
                                                        <DataGridTextColumn x:Name="lDRTOPYColumn" Binding="{Binding Path=LDRTOPY}" Header="RTOPY" Width="SizeToCells" MinWidth="50"/>
                                                        <DataGridTextColumn x:Name="lDRBOTTOMXColumn" Binding="{Binding Path=LDRBOTTOMX}" Header="RBX" Width="SizeToCells" MinWidth="50" />
                                                        <DataGridTextColumn x:Name="lDRBOTTOMYColumn" Binding="{Binding Path=LDRBOTTOMY}" Header="RBY" Width="SizeToCells" MinWidth="50"/>
                                                    </DataGrid.Columns>
                                                </DataGrid>
                                            </Grid>
                                        </StackPanel>
                                    </StackPanel>
                                </WrapPanel>
                            </WrapPanel>
                        </StackPanel>
                    </Grid>
                </WrapPanel>
            </TabItem>
            <TabItem Header="LED定义" DataContext="{StaticResource ResourceKey=lEDDataSet}" >
                <!--my:LEDUnit HorizontalAlignment="Stretch" VerticalAlignment="Stretch"></my:LEDUnit-->
            </TabItem>
        </TabControl>
    </Grid>
</UserControl>
